package com.durian.base.frame.activity

import android.R
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import com.durian.app.Durian

/**
 * 说明：ActivityBaseLauncher
 * <p/>
 * 作者：Fanly
 * <p/>
 * 类型：Class
 * <p/>
 * 时间：2020/08/14 16:40
 * <p/>
 * 版本：version 1.0
 */
abstract class ActivityBaseLauncher : Activity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        if (intent.flags and Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT != 0) {
            finish()
            return
        }
        overridePendingTransition(R.anim.fade_in, R.anim.fade_out)
        jumpMain()
        finish()
    }

    abstract fun jumpMain()
}